const std = @import("std");
const stdout = std.io.getStdOut().writer();
const expect = @import("std").testing.expect;

pub fn main() !void {
    try stdout.print("Result: {s}!\n", .{"hello world"});
    // ############################
    // 通用分配器
    var gpa = std.heap.GeneralPurposeAllocator(.{}){};
    const allocator = gpa.allocator();
    const name = "Pedro";
    const output = try std.fmt.allocPrint(allocator, "Hello {s}!!!", .{name});
    try stdout.print("{s}\n", .{output});
    // ############################
}

test "test main" {
    const n = 8;
    try stdout.print("Result: {d}!\n", .{n});
}
